<?php

include '../QQTranslator.php';
include 'config/config.php';

if (!isset($_GET['sourceText'])) {
    echo "需要传入有效的参数";
    exit;
}

$str = htmlspecialchars($_GET['sourceText']);
$str = urldecode($str);

$qqtr = new QQTranslator();

$qqtr->setSecretId($secretID);
$qqtr->setSecretKey($secretKey);
$qqtr->setProjectId($projectID);

echo $qqtr->translateString($str);

